package com.jzo2o.customer.controller.open;

import com.jzo2o.customer.mapper.AgencyCertificationMapper;
import com.jzo2o.customer.model.domain.AgencyCertification;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author itcast
 */
@RestController("operationOpenAgencyCertificationAuditController")
@RequestMapping("/operation/agency-certification-audit/audit/{id}")
@Api(tags = "机构端 ")
public class OpenAgencyCertificationAuditController {


    @Resource
    private AgencyCertificationMapper agencyCertificationMapper;

    @PutMapping("/{id}")
    @ApiOperation("审核机构认证信息")
    public AgencyCertification detail(@PathVariable("id") Long id, String certificationStatus, String rejectReason) {

       AgencyCertification agencyCertification =  agencyCertificationMapper.updateStatusAndReason(id, certificationStatus, rejectReason);
       return agencyCertification;
    }

}
